<?php
class Lib_Tpl{
	public function __construct(){
		
	}
	public static function show($filename,$Template){
		//变量过滤,只剩下 $CFG,$MDD,$Template,$user_info;
		global $CFG,$MDD,$user_info;
		unset($_GET);
		unset($_POST);
		unset($_COOKIE);
//		unset($_SERVER);
		if (isset($_REQUEST['template_debug'])) {
			echo "<pre>";
			var_dump($Template);
			echo "</pre>";
		}
		$template_file = $CFG['tpl_path']."/".$filename.'.php';
		if (file_exists($template_file)) {
			require $template_file;
		}else{
			echo 'templage file not exists. file_path:'.$template_file;
		}
		return true;
	}
}
?>
